package com.ciccwm.dubbo;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@EnableDubbo
@SpringBootApplication
@Slf4j
public class DubboSpringBootApplication {
    public static void main(String[] args) {
        SpringApplication.run(DubboSpringBootApplication.class, args);
    }

    @Slf4j
    @Component
    static class LogTestRunner implements CommandLineRunner {
        @Override
        public void run(String... args) {
            log.trace("这是一条TRACE日志");
            log.debug("这是一条DEBUG日志");
            log.info("这是一条INFO日志");
            log.warn("这是一条WARN日志");
            log.error("这是一条ERROR日志");
        }
    }
}